<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/admin/lib/html5shiv.js"></script>
    <script type="text/javascript" src="/admin/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui/css/H-ui.css"/>
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="/admin/lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="/admin/static/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="/admin/lib/jquery.autocompleter/css/main.css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="/admin/lib/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title></title>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 检测业务 <span class="c-gray en">&gt;</span>
    <a href="javascript:;" onclick="location.href='/{{config('constant.name_admin')}}/contract/viewAllBatch';">全部批次</a>
    <span class="c-gray en">&gt;</span> 查看【{{ $contractInfo->client_name }}】
    <a class="btn btn-primary radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"
       title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    <a class="btn btn-primary radius r mr-10" style="line-height:1.6em;margin-top:3px" href='/{{config('constant.name_admin')}}/contract/viewAllBatch'>
        <i class="Hui-iconfont Hui-iconfont-arrow1-left"></i>&nbsp;&nbsp;返回
    </a>
</nav>

<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray mt-10">
		<span class="l">
			<a class="btn btn-primary radius" href="javascript:;" onclick="download_contract({{ $contractInfo->id }})">查看合同</a>
		</span>
        <span class="l ml-20">
			<a class="btn btn-primary radius" href="javascript:;" onclick="download_report({{ $contractInfo->id }})">查看检测报告</a>
		</span>
        <span class="l ml-20">
			<a class="btn btn-primary radius" href="javascript:;" onclick="view_detail_info({{ $contractInfo->id }})">查看详细信息</a>
		</span>
        <span class="l ml-20">
			<a class="btn btn-primary radius" href="javascript:;" onclick="view_over_info({{ $contractInfo->batchNum }})">查看试验台账</a>
		</span>
    </div>
    <div class="mt-10">
        <table class="table table-border table-bordered table-hover table-bg table-responsive table-condensed">
            <thead>
            <tr class="text-c">
                <th>样品名称</th>
                <th>额定电压</th>
                <th>分类</th>
                <th>检验标准</th>
                <th>检验项目</th>
                <th>数量</th>
                <th>单位</th>
                <th>条码范围</th>
                <th>备注</th>
            </tr>
            </thead>
            <tbody>
            @foreach ($data as $val)
                <tr class="text-c">
                    <td>{{ $val->tool_name }}</td>
                    <td>{{ $val->voltage }}</td>
                    <td>{{ $val->class }}</td>
                    <td>{{ $val->std_num }}</td>
                    <td>{{ $val->item_names }}</td>
                    <td>{{ $val->count }}</td>
                    <td>{{ $val->unit }}</td>
                    <td>{{ $val->bar_codes }}</td>
                    <td>{{ $val->remark }}</td>
                </tr>
            @endforeach

            </tbody>
        </table>
    </div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/admin/lib/layer/3.1.1/layer.js"></script>
<script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    /*下载报告*/
    function download_report(id, pdf = 0) {
        window.open('/{{config('constant.name_admin')}}/exportReport/export?id=' + id + '&toPdf=' + pdf, '_blank');
    }

    /*下载合同*/
    function download_contract(id) {
        window.open('/{{config('constant.name_admin')}}/contract/export?id=' + id, '_blank');
    }

    /*查看详细信息*/
    function view_detail_info(id) {
        location.href = '/{{config('constant.name_admin')}}/sampleInfo/viewCheck?id=' + id;
    }

    /*查看试验台账*/
    function view_over_info(batchNum) {
        location.href = '/{{config('constant.name_admin')}}/sampleinfo/list?b_batchNum=' + batchNum;
    }

</script>
</body>
</html>
